<template>
  <div class="xtx-tabs-panel" v-show="name===activeName">
    <slot/>
  </div>
</template>
<script>
import { inject } from '@vue/runtime-core'
export default {
  name: 'XtxTabsPanel',
  props: {
    // 标签页标题
    lebel: {
      type: String,
      default: ''
    },
    // 选项卡唯一标识
    name: {
      type: String,
      default: ''
    }
    // $slot.default() 默认插槽内容
  },
  setup () {
    const activeName = inject('activeName')
    return { activeName }
  }
}
</script>

<style lang="less" scoped>

</style>
